package com.project.entity.user;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.project.entity.enumcommon.UserTypeEnum;
import com.project.entity.sys.Area;

@Entity
@Table(name="B_USER")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicInsert
@DynamicUpdate
public class User extends BaseUser{

	private static final long serialVersionUID = -1792530766382962886L;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="registration_time")
	private Date registrationTime;//注册时间
	
	@Column(name="user_type")
	@Enumerated(EnumType.STRING)
	private UserTypeEnum userType;//用户类型(Z:注册用户；H:会员)
	
	@Column(name="wechat_openid")
	private String wechatOpenid;//微信openid
	
    public Date getRegistrationTime() {
		return registrationTime;
	}

	public void setRegistrationTime(Date registrationTime) {
		this.registrationTime = registrationTime;
	}

	public UserTypeEnum getUserType() {
		return userType;
	}

	public void setUserType(UserTypeEnum userType) {
		this.userType = userType;
	}

	public String getWechatOpenid() {
		return wechatOpenid;
	}

	public void setWechatOpenid(String wechatOpenid) {
		this.wechatOpenid = wechatOpenid;
	}

}
